package com.cari.oa.domain;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.validation.constraints.NotNull;

import org.hibernate.annotations.GenericGenerator;
import org.hibernate.validator.constraints.Length;

@Entity
@Table(name = "T_MARKETPROJECT_COMMENT")
public class MarketProjectCommentEntity implements Serializable {

	private static final long serialVersionUID = -6891875585677826505L;

    @Id
    @Length(max = 32)
    @GeneratedValue(generator = "system-uuid")
    @GenericGenerator(name = "system-uuid", strategy = "uuid")
    private String id;
    
    @NotNull(message = "所属项目不能为空")
    @Length(max = 32, message = "项目ID长度要小于32个字符")
    @Column(name = "project_id")
    private String projectId;//项目ID
    
    @NotNull(message = "用户不能为空")
    @Length(max = 32, message = "用户英文名长度要小于32个字符")
    @Column(name = "user_enname")
    private String userEnname;//用户英文名
    
    @Length(max = 32, message = "用户中文名长度要小于32个字符")
    @Column(name = "user_cnname")
    private String userCnname;//用户中文名
    
    @NotNull(message = "创建时间不能为空")
    @Column(name = "create_time")
    private Date createTime = new Date();//创建时间
    
    @NotNull(message = "留言内容不能为空")
    @Length(max = 500, message = "留言内容长度要小于500个字符")
    private String content;//留言内容

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getProjectId() {
		return projectId;
	}

	public void setProjectId(String projectId) {
		this.projectId = projectId;
	}

	public String getUserEnname() {
		return userEnname;
	}

	public void setUserEnname(String userEnname) {
		this.userEnname = userEnname;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public String getUserCnname() {
		return userCnname;
	}

	public void setUserCnname(String userCnname) {
		this.userCnname = userCnname;
	}
	
}
